#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>


typedef int  SLTDataType;

typedef struct SListNode
{
	SLTDataType data;
	struct SListNode* next;
}SLTNode;

void PrintSList(SLTNode * phead)
{
	SLTNode* cur = phead;
	while (cur != NULL)
	{
		printf("->%d", cur->data);
		cur = cur->next;
	}
	printf("->NULL\n");
}

int main()
{
	SLTNode* n1 = (SLTNode*)malloc(sizeof(SLTNode)) ;
	n1->data = 10;

	SLTNode* n2 = (SLTNode*)malloc(sizeof(SLTNode));
	n2->data = 20;

	SLTNode* n3 = (SLTNode*)malloc(sizeof(SLTNode));
	n3->data = 30;

	n1->next = n2;
	n2->next = n3;
	n3->next = NULL;

	PrintSList(n1);

	return 0;
}